package com.mpyy.service.purchase;

import com.mpyy.dao.purchase.SelectProInfoDaoInter;
import com.mpyy.pojo.ProductInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Descoription SelectProInfoServiceImpl
 * @Author CG
 * @date 2022-03-10
 */
@Service(value = "selectProInfoServiceImpl")
public class SelectProInfoServiceImpl implements SelectProInfoServiceInter {

    @Autowired
    @Qualifier(value = "selectProInfoDaoInter")
    private SelectProInfoDaoInter proInfoDaoInter;


    /**查询商品信息
     *
     * @param proId
     * @param proName
     * @return
     */
    @Override
    public List<ProductInfo> selectProInfoDao(String proId, String proName) {
       return proInfoDaoInter.selectProInfoDao(proId,proName);
    }

    /**商品总条数
     *
     * @return
     */
    @Override
    public int productCount() {
        return proInfoDaoInter.productCount();
    }

    /**根据商品上级分类查询商品信息
     * @param productInfo
     * @return
     */
    @Override
    public List<ProductInfo> selectProInfoClassify(ProductInfo productInfo) {
        return proInfoDaoInter.selectProInfoClassify(productInfo);
    }
}
